
*========================================================
*-=======================================================
*=======Collective Labor Rights and Chinese FDI =========
*=======Yujeong YANG						=============
*=======July,2023 							=============
*=========================================================
*========================================================
*-=======================================================
 use "ChineseOFDI&CLR" , clear

 #delimit ;
macro define covars0 " gdp_log   gdpgrowth   rent polity2"
;
#delimit ;
macro define covars1 " gdp_log     gdpgrowth   rent polity2   trade bit_update overallLR_geo overallLR_inc ilo "
;
#delimit ;
macro define covars2 " gdp_log     gdpgrowth   rent polity2   overallLR_geo overallLR_inc  ilo trade bit_update bit_rat_china_carryover bri_cfr_carryover  leadervisit unscmember  taiwan"
;
#delimit ;
macro define covars3 " gdp_log     gdpgrowth   rent polity2   overallLR_geo overallLR_inc  ilo trade bit_update bit_rat_china_carryover bri_cfr_carryover  leadervisit unscmember   taiwan  intrastate interstate_all"
;

gen instrument = cofdi_stock_overallfdi *probability_cofdi


***Table 1. Chinese FDI and collective labor rights (all countries) ***
eststo clear
eststo: xtpcse overallLR  L1.china_ofdi_stock_gdp   L1. nonchina_fdi_stock_gdp  $covars0  i.year i.cowcode   , correlation(psar1)
eststo: xtpcse overallLR  L1.china_ofdi_stock_gdp   L1. nonchina_fdi_stock_gdp  $covars1  i.year i.cowcode   , correlation(psar1)
eststo: xtpcse overallLR  L1.china_ofdi_stock_gdp   L1. nonchina_fdi_stock_gdp  $covars2  i.year i.cowcode   , correlation(psar1)
eststo: xtpcse overallLR  L1.china_ofdi_stock_gdp   L1. nonchina_fdi_stock_gdp  $covars3  i.year i.cowcode   , correlation(psar1)
eststo: xtpcse overallLR  L1.overallLR L1.china_ofdi_stock_gdp   L1. nonchina_fdi_stock_gdp  $covars3  i.year i.cowcode   , correlation(psar1)
eststo: xtivreg2 overallLR  (L1.china_ofdi_stock_gdp= L1.instrument )   L1.nonchina_fdi_stock_gdp $covars3 year_*  , fe first gmm2s


esttab using "overall_allcountries.tex", label drop( *cowcode* *year* )  /// 
order (china_ofdi_stock_gdp nonchina_fdi_stock_gdp  /// 
gdp_log     gdpgrowth   rents polity2    trade bit_update  overallLR_geo overallLR_inc  ilo ///
bit_rat_china_carryover bri_cfr_carryover  leadervisit unscmember     taiwan  /// 
intrastate interstate_all )  ///
nonotes se(3) b(4) replace star(* 0.10 ** 0.05 *** 0.01) compress nogaps  nobase nodepvars mtitles("" "" "" "" "" "") stats(N N_g, fmt(0 0 ) label(Observations Countries ))




****Table 2. Collective labor rights in developing and developed host countries ***  
gen china_ofdi_stock_gdp_lagg=L1.china_ofdi_stock_gdp
eststo clear
eststo: xtpcse overallLR  c.china_ofdi_stock_gdp_lag##i.devcountries   L1. nonchina_fdi_stock_gdp  $covars3  i.year i.cowcode  
eststo: xtpcse overallLR  L1.china_ofdi_stock_gdp   L1. nonchina_fdi_stock_gdp  $covars3  i.year i.cowcode  if devcountries==1  , correlation(psar1)
eststo: xtivreg2 overallLR  (L1.china_ofdi_stock_gdp= L1.instrument )   L1.nonchina_fdi_stock_gdp $covars3 year_* if devcountries==1 , fe first gmm2s
eststo: xtpcse overallLR  L1.china_ofdi_stock_gdp   L1. nonchina_fdi_stock_gdp  $covars3  i.year i.cowcode  if devcountries==0  , correlation(psar1)
eststo: xtivreg2 overallLR  (L1.china_ofdi_stock_gdp= L1.instrument )   L1.nonchina_fdi_stock_gdp $covars3 year_* if devcountries==0 , fe first gmm2s

esttab using "overall_by_developmentLevel.tex", label drop( *cowcode* *year* )  /// 
order (china_ofdi_stock_gdp nonchina_fdi_stock_gdp  /// 
gdp_log     gdpgrowth   rents polity2   trade bit_update overallLR_geo overallLR_inc  ilo  ///
bit_rat_china_carryover bri_cfr_carryover  leadervisit unscmember    taiwan  /// 
intrastate interstate_all )  ///
nonotes se(3) b(4) replace star(* 0.10 ** 0.05 *** 0.01) compress nogaps  nobase nodepvars mtitles("" "" "" "" "" "") stats(N N_g, fmt(0 0 ) label(Observations Countries ))



**Table 3. Collective labor rights in Law and Practice  ****

eststo clear
eststo: xtpcse  lawLR    L1.china_ofdi_stock_gdp   L1. nonchina_fdi_stock_gdp  $covars0  i.year i.cowcode   , correlation(psar1)
eststo: xtpcse  lawLR    L1.china_ofdi_stock_gdp   L1. nonchina_fdi_stock_gdp  $covars0  i.year i.cowcode   if devcountries==1, correlation(psar1)
eststo: xtpcse  lawLR    L1.china_ofdi_stock_gdp   L1. nonchina_fdi_stock_gdp  $covars0  i.year i.cowcode   if devcountries==0, correlation(psar1)
eststo: xtpcse  practiceLR    L1.china_ofdi_stock_gdp   L1. nonchina_fdi_stock_gdp  $covars0  i.year i.cowcode   , correlation(psar1)
eststo: xtpcse  practiceLR    L1.china_ofdi_stock_gdp   L1. nonchina_fdi_stock_gdp  $covars0  i.year i.cowcode   if devcountries==1, correlation(psar1)
eststo: xtpcse  practiceLR    L1.china_ofdi_stock_gdp   L1. nonchina_fdi_stock_gdp  $covars0  i.year i.cowcode   if devcountries==0, correlation(psar1)



 esttab using "CLR_LawPractice_by_developmentLevel.tex", label drop( *cowcode* *year* )  /// 
order (china_ofdi_stock_gdp nonchina_fdi_stock_gdp  /// 
gdp_log     gdpgrowth   rents polity2    trade bit_update overallLR_geo overallLR_inc  ilo ///
bit_rat_china_carryover bri_cfr_carryover  leadervisit unscmember     taiwan  /// 
intrastate interstate_all )  ///
nonotes se(3) b(4) replace star(* 0.10 ** 0.05 *** 0.01) compress nogaps  nobase nodepvars mtitles("" "" "" "" "" "") stats(N N_g, fmt(0 0 ) label(Observations Countries ))





*====Table 4. Collective labor rights by sources of FDI ****
eststo clear
eststo: xtpcse overallLR  L1.china_ofdi_stock_gdp  L1.FDI_developed_gdp_unctad L1.FDI_developing_gdp_unctad $covars0 i.year i.cowcode    , correlation(psar1)
eststo: xtpcse lawLR  L1.china_ofdi_stock_gdp  L1.FDI_developed_gdp_unctad L1.FDI_developing_gdp_unctad $covars0 i.year i.cowcode    , correlation(psar1)
eststo: xtpcse practiceLR  L1.china_ofdi_stock_gdp  L1.FDI_developed_gdp_unctad L1.FDI_developing_gdp_unctad $covars0 i.year i.cowcode    , correlation(psar1)
eststo: xtpcse overallLR  L1.china_ofdi_stock_gdp  L1.FDI_demo_gdp_unctad L1.FDI_auto_gdp_unctad  $covars0 i.year i.cowcode     , correlation(psar1)
eststo: xtpcse lawLR  L1.china_ofdi_stock_gdp  L1.FDI_demo_gdp_unctad L1.FDI_auto_gdp_unctad  $covars0 i.year i.cowcode     , correlation(psar1)
eststo: xtpcse practiceLR  L1.china_ofdi_stock_gdp  L1.FDI_demo_gdp_unctad L1.FDI_auto_gdp_unctad  $covars0 i.year i.cowcode     , correlation(psar1)
 
 
 esttab using "CLR_byDifferentGroupings.tex", label drop( *cowcode* *year* )  /// 
order (china_ofdi_stock_gdp nonchina_fdi_stock_gdp  /// 
gdp_log     gdpgrowth   rents polity2    trade bit_update overallLR_geo overallLR_inc  ilo ///
bit_rat_china_carryover bri_cfr_carryover  leadervisit unscmember    taiwan  /// 
intrastate interstate_all )  ///
nonotes se(3) b(4) replace star(* 0.10 ** 0.05 *** 0.01) compress nogaps  nobase nodepvars mtitles("" "" "" "" "" "") stats(N N_g, fmt(0 0 ) label(Observations Countries ))


 
*===Table 5. Chinese investment in different industrial sectors and collective labor rights =====*
*CGIT is available only after 2005***

 eststo clear
eststo: xtpcse overallLR  L1.primary_cgit_gdp L1.secondary_cgit_gdp L1.tertiary_cgit_gdp  L1. nonchina_fdi_inflow_gdp $covars0 i.year i.cowcode, corr(psar1)
eststo:xtpcse lawLR  L1.primary_cgit_gdp L1.secondary_cgit_gdp L1.tertiary_cgit_gdp  L1. nonchina_fdi_inflow_gdp $covars0 i.year i.cowcode, corr(psar1)
eststo:xtpcse practiceLR  L1.primary_cgit_gdp L1.secondary_cgit_gdp L1.tertiary_cgit_gdp  L1. nonchina_fdi_inflow_gdp  $covars0 i.year i.cowcode, corr(psar1)
eststo:xtpcse overallLR  L1.primary_cgit_gdp L1.secondary_cgit_gdp L1.tertiary_cgit_gdp  L1. nonchina_fdi_inflow_gdp  $covars0 i.year i.cowcode if devcountries ==1, corr(psar1)
eststo:xtpcse lawLR  L1.primary_cgit_gdp L1.secondary_cgit_gdp L1.tertiary_cgit_gdp  L1. nonchina_fdi_inflow_gdp  $covars0 i.year i.cowcode  if devcountries ==1, corr(psar1)
eststo:xtpcse practiceLR  L1.primary_cgit_gdp L1.secondary_cgit_gdp L1.tertiary_cgit_gdp  L1. nonchina_fdi_inflow_gdp  $covars0 i.year i.cowcode if devcountries ==1, corr(psar1)
eststo:xtpcse overallLR  L1.primary_cgit_gdp L1.secondary_cgit_gdp L1.tertiary_cgit_gdp  L1. nonchina_fdi_inflow_gdp $covars0 i.year i.cowcode if devcountries ==0, corr(psar1)
eststo:xtpcse lawLR  L1.primary_cgit_gdp L1.secondary_cgit_gdp L1.tertiary_cgit_gdp  L1. nonchina_fdi_inflow_gdp $covars0 i.year i.cowcode  if devcountries ==0, corr(psar1)
eststo:xtpcse practiceLR  L1.primary_cgit_gdp L1.secondary_cgit_gdp L1.tertiary_cgit_gdp  L1. nonchina_fdi_inflow_gdp  $covars0 i.year i.cowcode if devcountries==0, corr(psar1)

 esttab using "CLR_bySector.tex", label drop( *cowcode* *year* )  /// 
order (china_ofdi_stock_gdp nonchina_fdi_stock_gdp  /// 
gdp_log     gdpgrowth   rents polity2   trade bit_update  overallLR_geo overallLR_inc  ilo ///
bit_rat_china_carryover bri_cfr_carryover  leadervisit unscmember     taiwan  /// 
intrastate interstate_all )  ///
nonotes se(3) b(4) replace star(* 0.10 ** 0.05 *** 0.01) compress nogaps  nobase nodepvars mtitles("" "" "" "" "" "") stats(N N_g, fmt(0 0 ) label(Observations Countries ))


*===Table 6. Chinese FDI by ownership=====*
eststo clear

 eststo:xtpcse overallLR  L1.state_1  L1.private L1.fdi_stock_gdp  $covars0  i.year i.cowcode ,  pairwise correlation(psar1)   
 eststo:xtpcse lawLR  L1.state_1  L1.private L1.fdi_stock_gdp  $covars0  i.year i.cowcode ,  pairwise correlation(psar1)
 eststo:xtpcse practiceLR  L1.state_1  L1.private L1.fdi_stock_gdp  $covars0  i.year i.cowcode ,  pairwise correlation(psar1)	
 eststo:xtpcse lawLR  L1.state_1  L1.private L1.fdi_stock_gdp  $covars0  i.year i.cowcode if devcountri==1 ,  pairwise correlation(psar1)
  eststo:xtpcse practiceLR  L1.state_1  L1.private L1.fdi_stock_gdp  $covars0  i.year i.cowcode if devcountries==1,  pairwise correlation(psar1)	
 eststo:xtpcse lawLR  L1.state_1  L1.private L1.fdi_stock_gdp  $covars0  i.year i.cowcode if devcountries==0 ,  pairwise correlation(psar1)
 eststo:xtpcse practiceLR  L1.state_1  L1.private L1.fdi_stock_gdp  $covars0  i.year i.cowcode if devcountries==0 ,  pairwise correlation(psar1)	

 esttab using "CLR_byOwnership.tex", label drop( *cowcode* *year* )  /// 
order (china_ofdi_stock_gdp nonchina_fdi_stock_gdp  /// 
gdp_log     gdpgrowth   rents polity2   trade bit_update  overallLR_geo overallLR_inc  ilo ///
bit_rat_china_carryover bri_cfr_carryover  leadervisit unscmember     taiwan  /// 
intrastate interstate_all )  ///
nonotes se(3) b(4) replace star(* 0.10 ** 0.05 *** 0.01) compress nogaps  nobase nodepvars mtitles("" "" "" "" "" "") stats(N N_g, fmt(0 0 ) label(Observations Countries ))



 *===Table 7. Chinese FDI and substnative Labor Rights=====*

eststo clear
 eststo:xtpcse sri_l   L1.china_ofdi_stock_gdp   L1. nonchina_fdi_stock_gdp  $covars0   i.year i.cowcode  if devcountries==1 ,  pairwise correlation(psar1)
eststo:xtpcse sri_l   L1.china_ofdi_stock_gdp   L1. nonchina_fdi_stock_gdp  $covars0   i.year i.cowcode  if devcountries==0 ,  pairwise correlation(psar1)
 
 eststo:xtpcse sri_p   L1.china_ofdi_stock_gdp   L1. nonchina_fdi_stock_gdp  $covars0   i.year i.cowcode  if devcountries==1 ,  pairwise correlation(psar1)
eststo:xtpcse sri_p   L1.china_ofdi_stock_gdp   L1. nonchina_fdi_stock_gdp  $covars0   i.year i.cowcode  if devcountries==0 ,  pairwise correlation(psar1)

 esttab using "SubstantiveLR.tex", label drop( *cowcode* *year* )  /// 
order (china_ofdi_stock_gdp nonchina_fdi_stock_gdp  /// 
gdp_log     gdpgrowth   rents polity2   trade bit_update  overallLR_geo overallLR_inc  ilo ///
bit_rat_china_carryover bri_cfr_carryover  leadervisit unscmember     taiwan  /// 
intrastate interstate_all )  ///
nonotes se(3) b(4) replace star(* 0.10 ** 0.05 *** 0.01) compress nogaps  nobase nodepvars mtitles("" "" "" "" "" "") stats(N N_g, fmt(0 0 ) label(Observations Countries ))


